<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of login_model
 *
 * @author hrza
 */
class Login_model extends CI_Model {

    //put your code here 
    function validate() {
        $this->db->where('username', $this->input->post('username'));
        $this->db->where('password', md5($this->input->post('password')));
        $query = $this->db->get('membership');
        if($query->num_rows == 1) { 
            return true;
        }
    
    }

}

?>
